import Mock from  'mockjs'

/*
* 1. 数据模拟
* */
var users=Mock.mock({
    'list|5':[{
    username:'@name',
    password:'123456',
    'role|1':[{
      id:1,
      role_name:'admin'
    },{
      id:2,
      role_name:'common'
    }]
  }]
})

/*
 * 2. ajax拦截
* */
Mock.mock('http://test.org/user/list','get',users.list)
